package com.yingxin.yxerp.module.attachment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yingxin.yx.framework.commons.dto.AttachmentDto;
import com.yingxin.yxerp.module.attachment.entity.Attachment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 附件表 Mapper 接口
 * @author zhuchangjie
 * @since 2022-01-23
 */

public interface AttachmentMapper extends BaseMapper<Attachment> {

    List<AttachmentDto> listByBiz(@Param("businessId") String businessId, @Param("businessType") String businessType,
                                  @Param("businessAttr") String businessAttr);

    AttachmentDto getByBiz(@Param("businessId") String businessId, @Param("businessType") String businessType,
                           @Param("businessAttr") String businessAttr);

    /**
     * 根据 ids 获取集合
     */
    List<AttachmentDto> myListByIds(@Param("ids") List<String> ids);

}
